import { http } from '@/utils/http'
export interface IFooItem {
  id: string
  name: string
}

/** GET 请求 */
export const getFooAPI = (name: string) => {
  return http.get<IFooItem>('/foo', { name })
}

/** POST 请求 */
export const postFooAPI = (name: string) => {
  return http.post<IFooItem>('/foo', { name }, { name })
}

/** 测试接口 */
export const postCeshiAPI = (data: object) => {
  return http({
    url: `/dictionary/list`,
    method: 'POST',
    // query: { data }, // post 请求也支持 query
    data: { ...data },
  })
}
